home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 July
/
EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso
/
earcd
/
misc
/
math
/
ci.lha
/
ci.readme
< prev
Wrap
Text File
|
1997-04-02
|
2KB
|
72 lines
short: desktop calculator for complex numbers
author: thomas.radtke@uni-essen.de
uploader: thomas.radtke@uni-essen.de
type: misc/math or misc/edu
Hi #?,
This is ci, the desktop calculator for operations
on complex numbers. To install, just copy it to c: or
anywhere else in your command path. Call it with 'ci'
and leave it by pressing 'Ctrl-\' (control backslash, EOF).
ci accepts inputs in the conventional manner, that
is, real and imaginary part are seperated by addition or
subtraction. The imaginary part is multiplied or divided
by i (square root of -1).
ci knows the following operators:
a+b, a-b, a*b, a/b - the usual
a^b - exponentiation
@a - mean argument (angle)
|a| - modulus
~a - complex conjugation
ci knows the following constants:
i - square root of -1
e - Euler number
Every trigonometric operation can be acomplished with the
exponentiation operator, e.g.:
sin(x) == (e^(z*i)-e^(-z*i))/(2*i)
Of course, any root can be computed too, e.g.:
n-th root of a == a^(1/n)
Note that due to the unified way to compute the
exponentiation, the accuracy of the results is not what one
could get. Look at the result of -1^(1/2) in the examples
below. This will change in future versions where functions
and variables will be available :).
Examples:
$ ci
-1^(1/2)
6.123032e-17+i*1.000000e+00 <- real part should be 0 !
2^2
4.000000e+00+i*0.000000e+00
e^(4*i+2)
-4.829809e+00+i*-5.592056e+00
|1+i|
1.414214e+00+i*0.000000e+00
@(1+i)
7.853982e-01+i*0.000000e+00
(2+3*i)*(i^2)
-2.000000e+00+i*-3.000000e+00
The parser for ci were generated by 'bison'.
You may ask for improvements, but please understand that
I didn't have the time to answer all incoming mails immediatley.
Let me know if you are using ci for educational or other purposes
on a regulary (once a week or so) basis.
bye,
Thomas